#!/bin/bash
tar xf c-ares-1.15.0.tar.gz
cd c-ares-1.15.0
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$1/usr -DCMAKE_C_FLAGS=$CFLAGS -DCMAKE_SYSROOT=$1 -DCMAKE_TOOLCHAIN_FILE=$1/toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE=ON ..
make -j$2
make install
cd ../..
rm -rf c-ares-1.15.0
